<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=7" />
	<title>“半价汇”广告管理系统</title>
	<!-- Reset Stylesheet -->
	<link rel="stylesheet" href="static/css/reset.css" type="text/css" media="screen" />
  
	<!-- Main Stylesheet -->
	<link rel="stylesheet" href="static/css/style.css" type="text/css" media="screen" />
	
	<!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
	<link rel="stylesheet" href="static/css/invalid.css" type="text/css" media="screen" />	
	<link rel="stylesheet" type="text/css" media="screen" href="static/css//datePicker.css">

	<script type="text/javascript" src="static/js/jquery.min.js"></script>
	<!-- jQuery Configuration -->
	<script type="text/javascript" src="static/js/simpla.jquery.configuration.js"></script>

	<script type="text/javascript" src="static/js/jquery.metadata.js"></script>
	<script type="text/javascript" src="static/js/jquery.validate.min.js"></script>
</head>
<body>
	<div id="body-wrapper">
		<?php include 'admin_sidebar.html'; ?>
		<div id="main-content">
			<div class="content-box">
				<div class="content-box-header">
					<h3>添加字段</h3>
					<div class="clear"></div>
				</div>
				<div class="content-box-content">
				<form action="<?php echo spUrl('fields', 'add_fields');?>" method="post" id="field_add">
				<input type="hidden" name="type" value="<?php echo $type; ?>" />
				<fieldset>
						<p>
							<label>字段名称：</label>
							<input class="text-input medium-input" type="text" id="field_name" name="field_name" value="" />
							<br /><small>不能为空</small>
						</p>
						<p>
							<label>类型选择：</label>              
							<select name="field_type" validate="required:true">
								<option value="select">下拉框</option>
							</select>
							<br /><small>不能为空</small>
						</p>
						<p>
							<label>值：</label>
							<textarea name="settings" width="25">名称1|值1</textarea>
						</p>
						<p>
							<input type="submit" value="确定" class="button" style="width: 105px;" /> <input type="reset" style="width: 45px;" class="button">
						</p>
					</fieldset>
				</form>
				</div>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript">
$.metadata.setType("attr", "validate");

$().ready(function() {
	$("#field_add").validate({
		rules:{
			field_name: {
				required:true,
				minlength:3
			}
		}
	});
});
</script>
</html>